# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: HurricanePootis <hurricanepooits@protonmail.com>
# Contributor: Luis Martinez <luis.martinez@disroot.org>
# Contributor: Philip Goto <philip.goto@gmail.com>

pkgname=libspng
pkgver=0.7.4
pkgrel=2
pkgdesc='Simple, modern libpng alternative'
arch=(loong64 x86_64)
url=https://github.com/randy408/libspng
license=(BSD)
depends=(
  glibc
  zlib
)
makedepends=(
  git
  meson
)
provides=(libspng.so)
_tag=5c2183e3e81bf9d989dce3162cd903f986ef9c6e
source=(git+https://github.com/randy408/libspng.git?signed#tag=${_tag})
b2sums=(SKIP)
validpgpkeys=(4570C3DB9C3B37ABCC9086CB3EBDF887C2E2C548) # Randy <randy408@protonmail.com>

build() {
  arch-meson build libspng \
    -Dbuild_examples=false
  meson compile -C build
}

package() {
  DESTDIR="${pkgdir}" meson install -C build
  install -Dm 644 libspng/LICENSE -t "${pkgdir}"/usr/share/licenses/libspng/
}

# vim: ts=2 sw=2 et:
